package com.faxsun.web.endpoint.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

public class LiveRangeData{
    private String dateString;
    private String dayString;
    private String monthDayString;
    
    public LiveRangeData(Date date){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        
        String tmp = sdf.format(date);
        dateString = tmp.substring(0,10);
        monthDayString = tmp.substring(5,10);
        dayString = tmp.substring(8,10);
        if(dayString.startsWith("0")){
           dayString = dayString.substring(1, dayString.length());
        }
    }

    public String getDateString() {
        return dateString;
    }

    public void setDateString(String dateString) {
        this.dateString = dateString;
    }

    public String getDayString() {
        return dayString;
    }

    public void setDayString(String dayString) {
        this.dayString = dayString;
    }

    public String getMonthDayString() {
        return monthDayString;
    }

    public void setMonthDayString(String monthDayString) {
        this.monthDayString = monthDayString;
    }
    
    
}
